<div class="col-sm-12 mt20">
  <div class="panel panel-default">
    <div class="panel-body">
      <div class="col-lg-2-4">
        <input type="text" class="form-control" ng-model="name" placeholder="产品名称">
      </div>
      <div class="col-lg-2-4">
        <div class="input-group" ng-click="dateOpen($event, date)">
          <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date.lable" is-open="date.opened"
          placeholder="开始时间" ng-required="true" close-text="关闭" current-text="今天" clear-text="清除" readonly/>
          <span class="input-group-btn">
            <button type="button" class="btn btn-default">
              <i class="glyphicon glyphicon-calendar"></i>
            </button>
          </span>
        </div>
      </div>
      <div class="col-lg-2-4">
        <div class="input-group" ng-click="dateOpen($event, date1)">
          <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date1.lable" is-open="date1.opened" 
          placeholder="结束时间" ng-required="true" close-text="关闭" current-text="今天" clear-text="清除" readonly/>
          <span class="input-group-btn">
            <button type="button" class="btn btn-default">
              <i class="glyphicon glyphicon-calendar"></i>
            </button>
          </span>
        </div>
      </div>

      <div class="col-lg-2 pull-right">
        <button class="btn btn-block btn-info" ng-click="search()">立即搜索</button> 
      </div>
    </div>
  </div>

  <div class="panel panel-default">
    <div class="panel-body">
      <table class="table table-condensed table-hover table-bordered">
        <thead>
          <tr>
            <th class="col-md-2 text-center">销售品名称</th>
            <th class="col-md-2 text-center">商户信息</th>
            <th class="col-md-1 text-center">总金额</th>
            <th class="col-md-1 text-center">购买数量</th>
            <th class="col-md-1 text-center">使用数量</th>
            <th class="col-md-1 text-center">退票数量</th>
            <th class="col-md-1 text-center">使用补贴金额</th>
            <th class="col-md-1 text-center">红包返现金额</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-if="countList.length == 0">
            <td colspan="8" class="text-center"><h4>无订单统计数据</h4></td>
          </tr>
          <tr ng-repeat="obj in countList" ng-if="countList.length > 0">
            <td>{{obj.order_name}}<br/>{{obj.product_code}}</td>
            <td>{{obj.company_name}}<br/>{{obj.company_code}}</td>
            <td class="text-center" style="vertical-align: middle">{{(obj.pay_price||0)/100 | currency: '￥'}}</td>
            <td class="text-center" style="vertical-align: middle">{{obj.num}}</td>
            <td class="text-center" style="vertical-align: middle">{{obj.used}}</td>
            <td class="text-center" style="vertical-align: middle">{{obj.back}}</td>
            <td class="text-center" style="vertical-align: middle">{{(obj.subsidy_price||0)/100 | currency: '￥'}}</td>
            <td class="text-center" style="vertical-align: middle">{{(obj.redpacket_price||0)/100 | currency: '￥'}}</td>
          </tr>
          <tr ng-if="countList.length > 0">
            <td colspan="2" class="text-center">合计</td>
            <td class="text-center">{{total.pay_price / 100 | currency : '￥'}}</td>
            <td class="text-center">{{total.num}}</td>
            <td class="text-center">{{total.used}}</td>
            <td class="text-center">{{total.back}}</td>
            <td class="text-center">{{total.subsidy_price / 100 | currency : '￥'}}</td>
            <td class="text-center">{{total.redpacket_price / 100 | currency : '￥'}}</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</div>
        
